home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 1.iso
/
ARGONET
/
PD
/
PROGRAMMING
/
LCLINT2.SPK
/
test
/
test_b
/
expect
/
preds
< prev
next >
Wrap
Text File
|
1996-08-28
|
4KB
|
66 lines
preds.c: (in function f)
preds.c:8,7: Test expression for if not bool, type int: *p
Test expression type is not boolean or int. (-predboolint will suppress
message)
preds.c:13,8: Operand of ! is non-boolean (int): !(*p)
The operand of a boolean operator is not a boolean. Use +ptrnegate to allow !
to be used on pointers. (-boolops will suppress message)
preds.c:18,7: Test expression for if is assignment expression: b1 = b2
The condition test is an assignment expression. Probably, you mean to use ==
instead of =. If an assignment is intended, add an extra parentheses nesting
(e.g., if ((a = b)) ...) to suppress this message. (-predassign will suppress
message)
preds.c:23,7: Test expression for if not bool, type char: (c = 'a')
Test expression type is not boolean. (-predboolothers will suppress message)
preds.c:28,7: Use of == with bool variables (risks inconsistency because of
multiple true values): b1 == b2
Two bool values are compared directly using a C primitive. This may produce
unexpected results since all non-zero values are considered TRUE, so
different TRUE values may not be equal. The file bool.h (included in
lclint/lib) provides bool_equal for safe bool comparisons. (-boolcompare will
suppress message)
preds.c:33,7: Test expression for if not bool, type char: c
Finished LCLint checking --- 6 code errors found, as expected
preds.c: (in function f)
preds.c:18,7: Test expression for if is assignment expression: b1 = b2
The condition test is an assignment expression. Probably, you mean to use ==
instead of =. If an assignment is intended, add an extra parentheses nesting
(e.g., if ((a = b)) ...) to suppress this message. (-predassign will suppress
message)
Finished LCLint checking --- 1 code error found, as expected
preds.c: (in function f)
preds.c:3,8: Operand of ! is non-boolean (int *): !p
The operand of ! operator is a pointer. (+ptrnegate will suppress message)
preds.c:8,7: Test expression for if not bool, type int: *p
Test expression type is not boolean or int. (-predboolint will suppress
message)
preds.c:13,8: Operand of ! is non-boolean (int): !(*p)
The operand of a boolean operator is not a boolean. Use +ptrnegate to allow !
to be used on pointers. (-boolops will suppress message)
preds.c:18,7: Test expression for if is assignment expression: b1 = b2
The condition test is an assignment expression. Probably, you mean to use ==
instead of =. If an assignment is intended, add an extra parentheses nesting
(e.g., if ((a = b)) ...) to suppress this message. (-predassign will suppress
message)
preds.c:23,7: Test expression for if not bool, type char: (c = 'a')
Test expression type is not boolean. (-predboolothers will suppress message)
preds.c:28,7: Use of == with bool variables (risks inconsistency because of
multiple true values): b1 == b2
Two bool values are compared directly using a C primitive. This may produce
unexpected results since all non-zero values are considered TRUE, so
different TRUE values may not be equal. The file bool.h (included in
lclint/lib) provides bool_equal for safe bool comparisons. (-boolcompare will
suppress message)
preds.c:33,7: Test expression for if not bool, type char: c
preds.c:1,5: Function f declared but not used
A function is declared but not used. Use /*@unused@*/ in front of function
header to suppress message. (-fcnuse will suppress message)
preds.c:39,1: Definition of f
Finished LCLint checking --- 8 code errors found, as expected